import { WindowCreator } from '../hooks/createdWindow'
import {  screen } from 'electron'

let mainWindow: WindowCreator | null = null
export function createWindow() {
  const primaryDisplay = screen.getPrimaryDisplay()
  const { width, height } = primaryDisplay.workAreaSize

  mainWindow = new WindowCreator({
    title: '主窗口',
    width: 55,
    height: 55,
    frame: false, // 无边框
    fullscreenable: false, // 不可全屏
    transparent: true, // 透明
    alwaysOnTop: true, // 始终在最上层
    skipTaskbar: true, // 不在任务栏显示
    //位置设置在屏幕右下角
    x: width - 100, // 向右偏移10px留出空隙
    y: height - 100, // 向下偏移10px留出空隙
    resizable: false, // 不可调整大小
    entry: 'index.html'
  })
  mainWindow.show()


}


